<?xml version="1.0"  encoding="utf-8" ?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:output method="xml" indent="yes" />
	<xsl:template match="/">
		<fo:root>
			<fo:layout-master-set>
				<fo:simple-page-master page-height="297mm"
					page-width="210mm" master-name="stranica" margin-left="10mm"
					margin-right="10mm" margin-top="2mm">
					<fo:region-body />
					<fo:region-after extent="10mm" />
				</fo:simple-page-master>
			</fo:layout-master-set>

			<fo:page-sequence master-reference="stranica">
				<fo:flow flow-name="xsl-region-body">
					<fo:block font-size="7pt" font-family="Arial">

						<xsl:for-each select="//Sport">
							<fo:table border-width="2px" border-style="solid"
								margin-top="5mm" keep-together="always" text-align="center">
								<fo:table-header>
									<fo:table-row>
										<fo:table-cell width="190mm">
											<fo:block font-weight="bold" text-transform="uppercase"
												font-size="5em" margin-top="2mm">
												<xsl:value-of
													select="Translation[@key='name']/TranslatedValue[@lang='hr']/@value" />
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-header>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>

							<!--<xsl:for-each select="//Category"> <xsl:comment> <xsl:value-of 
								select="Translation/TranslatedValue/@value" /> </xsl:comment> <xsl:call-template 
								name="Kosarka"> <xsl:with-param name="drzava" select="Translation/TranslatedValue/@value"/> 
								</xsl:call-template> -->

							<xsl:variable name="nesto" select="@id" />
							<xsl:comment>
								<xsl:value-of select="$nesto" />
							</xsl:comment>
							<xsl:for-each select="Category">
								<xsl:comment>
									<xsl:value-of select="Translation/TranslatedValue/@value" />
								</xsl:comment>
								<xsl:choose>
								
									<xsl:when test="$nesto=1">
										<xsl:call-template name="Nogomet">
											<xsl:with-param name="drzava"
												select="Translation/TranslatedValue/@value" />
										</xsl:call-template>
										<xsl:comment>

											<xsl:value-of select="Tournament/Translation/TranslatedValue/@value" />
											<xsl:for-each
												select="Tournament/LeagueTable/LeagueTableRows/LeagueTableRow">
												+
												<xsl:value-of select="Team/@name" />

											</xsl:for-each>
										</xsl:comment>
									</xsl:when>


									<xsl:when test="$nesto = '2'">
										<xsl:call-template name="Kosarka">
											<xsl:with-param name="drzava"
												select="Translation/TranslatedValue/@value" />
										</xsl:call-template>
										<xsl:comment>
											*
											<xsl:value-of select="Tournament/Translation/TranslatedValue/@value" />
											<xsl:for-each
												select="Tournament/LeagueTable/LeagueTableRows/LeagueTableRow">
												+
												<xsl:value-of select="Team/@name" />

											</xsl:for-each>
										</xsl:comment>
									</xsl:when>
									
									<xsl:when test="$nesto = '6'">
										<xsl:call-template name="Rukomet">
											<xsl:with-param name="drzava"
												select="Translation/TranslatedValue/@value" />
										</xsl:call-template>
										<xsl:comment>
											*
											<xsl:value-of select="Tournament/Translation/TranslatedValue/@value" />
											<xsl:for-each
												select="Tournament/LeagueTable/LeagueTableRows/LeagueTableRow">
												+
												<xsl:value-of select="Team/@name" />

											</xsl:for-each>
										</xsl:comment>
									</xsl:when>

									
								</xsl:choose>
							</xsl:for-each>
						</xsl:for-each>
					</fo:block>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>


	<xsl:template name="Nogomet">
		<xsl:param name="drzava" />

		<fo:table border-width="1px" border-style="solid" margin-top="2mm"
			keep-together="always">
			<fo:table-header>
				<fo:table-row>
					<fo:table-cell number-columns-spanned="27">
						<fo:block font-weight="bold" text-transform="uppercase"
							font-size="2em" margin-left="1mm" margin-top="1mm">
							<xsl:value-of select="$drzava" /> - 
							
							<xsl:value-of
								select="Tournament/Translation[@key='name']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row border-top-width="0.5px"
					border-top-style="solid" border-top-color="#FFFFFF" text-align="center">
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA" number-columns-spanned="2">
						<fo:block font-weight="bold"></fo:block>
					</fo:table-cell>
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA" border-top-style="solid"
						border-top-color="#cccccc" number-columns-spanned="8">
						<fo:block margin-top="0.5mm" font-weight="bold">UKUPNO
						</fo:block>
					</fo:table-cell>
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA" border-top-style="solid"
						border-top-color="#cccccc" number-columns-spanned="8">
						<fo:block margin-top="0.5mm" font-weight="bold">KUĆI</fo:block>
					</fo:table-cell>
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA" border-top-style="solid"
						border-top-color="#cccccc" number-columns-spanned="8">
						<fo:block margin-top="0.5mm" font-weight="bold">VANI</fo:block>
					</fo:table-cell>
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.0px" border-right-style="solid"
						border-right-color="#000000" number-columns-spanned="1">
						<fo:block font-weight="bold"></fo:block>
					</fo:table-cell>
				</fo:table-row>

				<fo:table-row background-color="#000000" font-size="5pt"
					text-align="center">
					<fo:table-cell width="6mm" text-align="center">
						<fo:block font-weight="bold" color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='positionTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="29mm" text-align="start">
						<fo:block font-weight="bold" color="#ffffff">Klub</fo:block>
					</fo:table-cell>


					<fo:table-cell width="2mm" text-align="center"
						border-left-width="0.5px" border-left-style="solid"
						border-left-color="#AAAAAA">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>


					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">G.Raz.</fo:block>
					</fo:table-cell>
					<fo:table-cell width="8mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>


					<fo:table-cell width="2mm" text-align="center"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>
					<fo:table-cell width="2mm" text-align="center">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>


					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>

					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotalHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">G.Raz.</fo:block>
					</fo:table-cell>
					<fo:table-cell width="8mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>


					<fo:table-cell width="2mm" text-align="center"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>
					<fo:table-cell width="2mm" text-align="center">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>


					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>

					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotalAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">G.Raz.</fo:block>
					</fo:table-cell>
					<fo:table-cell width="8mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>


					<fo:table-cell width="2mm" text-align="center"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>


					<fo:table-cell width="6m" text-align="center">
						<fo:block color="#ffffff">Plasman</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-header>
			<fo:table-body>
				<xsl:for-each
					select="Tournament/LeagueTable/LeagueTableRows/LeagueTableRow">
					<fo:table-row>
						<xsl:if test="position() mod 2 = 1">
							<xsl:attribute name="background-color">#eeeeee</xsl:attribute>
						</xsl:if>
						<fo:table-cell width="6mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='positionTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="29mm" text-align="start">
							<fo:block font-weight="bold">
								<xsl:value-of select="Team/@name" />
							</fo:block>
						</fo:table-cell>







						<!-- PAROVI -->




						<!-- UKUPNO -->

						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center" border-left-width="0.5px" border-left-style="solid"
							border-left-color="#AAAAAA">
							<fo:block></fo:block>
						</fo:table-cell>


						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='matchesTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='winTotal']/@value" />
							</fo:block>
						</fo:table-cell>

						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='lossTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalsTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalDiffTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="8mm" font-weight="bold"
							text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='pointsTotal']/@value" />
							</fo:block>
						</fo:table-cell>


						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center" border-right-width="0.5px"
							border-right-style="solid" border-right-color="#AAAAAA">
							<fo:block></fo:block>
						</fo:table-cell>
						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center">
							<fo:block></fo:block>
						</fo:table-cell>




						<!-- KUCI -->




						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='matchesHome']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='winHome']/@value" />
							</fo:block>
						</fo:table-cell>

						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='lossHome']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalsTotalHome']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalDiffHome']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="8mm" font-weight="bold"
							text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='pointsHome']/@value" />
							</fo:block>
						</fo:table-cell>


						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center" border-right-width="0.5px"
							border-right-style="solid" border-right-color="#AAAAAA">
							<fo:block></fo:block>
						</fo:table-cell>
						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center">
							<fo:block></fo:block>
						</fo:table-cell>



						<!-- VANI -->



						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='matchesAway']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='winAway']/@value" />
							</fo:block>
						</fo:table-cell>

						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='lossAway']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalsTotalAway']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalDiffAway']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="8mm" font-weight="bold"
							text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='pointsAway']/@value" />
							</fo:block>
						</fo:table-cell>


						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center" border-right-width="0.5px"
							border-right-style="solid" border-right-color="#AAAAAA">
							<fo:block></fo:block>
						</fo:table-cell>


						<fo:table-cell width="14mm" text-align="center">
							<xsl:variable name="value"
								select="Promotion/Translation[@key='name']/TranslatedValue[@lang='hr']/@value" />
							<xsl:value-of select="$value" />
							<xsl:choose>
								<xsl:when test="$value = 'Liga Prvaka'">
									<fo:block>LP</fo:block>
								</xsl:when>
								<xsl:when test="$value = 'Kvalifikacije za Ligu Prvaka'">
									<fo:block>LP/Q</fo:block>
								</xsl:when>
								<xsl:when test="$value = 'UEFA Europska Liga, Kvalifikacije'">
									<fo:block>EL/Q</fo:block>
								</xsl:when>
								<xsl:when test="$value = 'Doigravanje za opstanak'">
									<fo:block>Doigravanje</fo:block>
								</xsl:when>
								<xsl:when test="$value = 'Internacionalno natjecanje'">
									<fo:block>Internac.N.</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<xsl:value-of select="$value" />
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>


					</fo:table-row>
				</xsl:for-each>
			</fo:table-body>
		</fo:table>

	</xsl:template>


	<xsl:template name="Kosarka">
		<xsl:param name="drzava" />
		<fo:table border-width="1px" border-style="solid" margin-top="2mm"
			keep-together="always">
			<fo:table-header>
				<fo:table-row>
					<fo:table-cell number-columns-spanned="27">
						<fo:block font-weight="bold" text-transform="uppercase"
							font-size="2em" margin-left="1mm" margin-top="1mm">
							<xsl:value-of select="$drzava" /> - 
							
							<xsl:value-of
								select="Tournament/Translation[@key='name']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row border-top-width="0.5px"
					border-top-style="solid" border-top-color="#FFFFFF" text-align="center">
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA" number-columns-spanned="2">
						<fo:block font-weight="bold"></fo:block>
					</fo:table-cell>
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA" border-top-style="solid"
						border-top-color="#cccccc" number-columns-spanned="8">
						<fo:block margin-top="0.5mm" font-weight="bold">UKUPNO</fo:block>
					</fo:table-cell>
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA" border-top-style="solid"
						border-top-color="#cccccc" number-columns-spanned="8">
						<fo:block margin-top="0.5mm" font-weight="bold">KUĆI
						</fo:block>
					</fo:table-cell>
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA" border-top-style="solid"
						border-top-color="#cccccc" number-columns-spanned="8">
						<fo:block margin-top="0.5mm" font-weight="bold">VANI</fo:block>
					</fo:table-cell>
					<fo:table-cell border-top-width="0.5px"
						border-right-width="0.0px" border-right-style="solid"
						border-right-color="#000000" number-columns-spanned="1">
						<fo:block font-weight="bold"></fo:block>
					</fo:table-cell>
				</fo:table-row>

				<fo:table-row background-color="#000000" font-size="5pt"
					text-align="center">
					<fo:table-cell width="6mm" text-align="center">
						<fo:block font-weight="bold" color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='positionTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="29mm" text-align="start">
						<fo:block font-weight="bold" color="#ffffff">Klub</fo:block>
					</fo:table-cell>


					<fo:table-cell width="2mm" text-align="center"
						border-left-width="0.5px" border-left-style="solid"
						border-left-color="#AAAAAA">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>


					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">G.Raz.</fo:block>
					</fo:table-cell>
					<fo:table-cell width="8mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>


					<fo:table-cell width="2mm" text-align="center"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>
					<fo:table-cell width="2mm" text-align="center">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>


					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>

					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotalHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">G.Raz.</fo:block>
					</fo:table-cell>
					<fo:table-cell width="8mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>


					<fo:table-cell width="2mm" text-align="center"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>
					<fo:table-cell width="2mm" text-align="center">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>


					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>

					<fo:table-cell width="5mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotalAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>
					<fo:table-cell width="10mm" text-align="center">
						<fo:block color="#ffffff">G.Raz.</fo:block>
					</fo:table-cell>
					<fo:table-cell width="8mm" text-align="center">
						<fo:block color="#ffffff">
							<xsl:value-of
								select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value" />
						</fo:block>
					</fo:table-cell>


					<fo:table-cell width="2mm" text-align="center"
						border-right-width="0.5px" border-right-style="solid"
						border-right-color="#AAAAAA">
						<fo:block color="#ffffff"></fo:block>
					</fo:table-cell>


					<fo:table-cell width="6m" text-align="center">
						<fo:block color="#ffffff">Plasman</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-header>
			<fo:table-body>
				<xsl:for-each
					select="Tournament/LeagueTable/LeagueTableRows/LeagueTableRow">
					<fo:table-row>
						<xsl:if test="position() mod 2 = 1">
							<xsl:attribute name="background-color">#eeeeee</xsl:attribute>
						</xsl:if>
						<fo:table-cell width="6mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='positionTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="29mm" text-align="start">
							<fo:block font-weight="bold">
								<xsl:value-of select="Team/@name" />
							</fo:block>
						</fo:table-cell>







						<!-- PAROVI -->




						<!-- UKUPNO -->

						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center" border-left-width="0.5px" border-left-style="solid"
							border-left-color="#AAAAAA">
							<fo:block></fo:block>
						</fo:table-cell>


						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='matchesTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='winTotal']/@value" />
							</fo:block>
						</fo:table-cell>

						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='lossTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalsTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalDiffTotal']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="8mm" font-weight="bold"
							text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='pointsTotal']/@value" />
							</fo:block>
						</fo:table-cell>


						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center" border-right-width="0.5px"
							border-right-style="solid" border-right-color="#AAAAAA">
							<fo:block></fo:block>
						</fo:table-cell>
						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center">
							<fo:block></fo:block>
						</fo:table-cell>




						<!-- KUCI -->




						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='matchesHome']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='winHome']/@value" />
							</fo:block>
						</fo:table-cell>

						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='lossHome']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalsTotalHome']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalDiffHome']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="8mm" font-weight="bold"
							text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='pointsHome']/@value" />
							</fo:block>
						</fo:table-cell>


						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center" border-right-width="0.5px"
							border-right-style="solid" border-right-color="#AAAAAA">
							<fo:block></fo:block>
						</fo:table-cell>
						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center">
							<fo:block></fo:block>
						</fo:table-cell>



						<!-- VANI -->



						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='matchesAway']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='winAway']/@value" />
							</fo:block>
						</fo:table-cell>

						<fo:table-cell width="5mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='lossAway']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalsTotalAway']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="10mm" text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='goalDiffAway']/@value" />
							</fo:block>
						</fo:table-cell>
						<fo:table-cell width="8mm" font-weight="bold"
							text-align="center">
							<fo:block>
								<xsl:value-of select="LeagueTableColumn[@key='pointsAway']/@value" />
							</fo:block>
						</fo:table-cell>


						<fo:table-cell width="2mm" font-weight="bold"
							text-align="center" border-right-width="0.5px"
							border-right-style="solid" border-right-color="#AAAAAA">
							<fo:block></fo:block>
						</fo:table-cell>


						<fo:table-cell width="14mm" text-align="center">
							<xsl:variable name="value"
								select="Promotion/Translation[@key='name']/TranslatedValue[@lang='hr']/@value" />
							<xsl:value-of select="$value" />
							<xsl:choose>
								<xsl:when test="$value = 'Liga Prvaka'">
									<fo:block>LP</fo:block>
								</xsl:when>
								<xsl:when test="$value = 'Kvalifikacije za Ligu Prvaka'">
									<fo:block>LP/Q</fo:block>
								</xsl:when>
								<xsl:when test="$value = 'UEFA Europska Liga, Kvalifikacije'">
									<fo:block>EL/Q</fo:block>
								</xsl:when>
								<xsl:when test="$value = 'Doigravanje za opstanak'">
									<fo:block>Doigravanje</fo:block>
								</xsl:when>
								<xsl:when test="$value = 'Internacionalno natjecanje'">
									<fo:block>Internac.N.</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<xsl:value-of select="$value" />
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>


					</fo:table-row>
				</xsl:for-each>
			</fo:table-body>
		</fo:table>
	</xsl:template>


  <xsl:template name="Rukomet">	
  <xsl:param name="drzava" />
    <fo:table border-width="1px" border-style="solid" margin-top="2mm"  keep-together="always">
      <fo:table-header>
        <fo:table-row>
          <fo:table-cell number-columns-spanned="27">
            <fo:block font-weight="bold" text-transform="uppercase" font-size="2em" margin-left="1mm" margin-top="1mm">
              <xsl:value-of select="$drzava" /> - 
              <xsl:value-of select="Tournament/Translation[@key='name']/TranslatedValue[@lang='hr']/@value" />
            </fo:block>
          </fo:table-cell>
        </fo:table-row>                   
        <fo:table-row border-top-width="0.5px" border-top-style="solid" border-top-color="#FFFFFF"  text-align="center">
          <fo:table-cell border-top-width="0.5px" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA"  number-columns-spanned="2">
            <fo:block font-weight="bold"></fo:block>
          </fo:table-cell>
          <fo:table-cell border-top-width="0.5px" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA" border-top-style="solid" border-top-color="#cccccc"  number-columns-spanned="8">
            <fo:block margin-top="0.5mm" font-weight="bold">UKUPNO</fo:block>                      
          </fo:table-cell>
          <fo:table-cell border-top-width="0.5px" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA" border-top-style="solid" border-top-color="#cccccc" number-columns-spanned="8">
            <fo:block margin-top="0.5mm" font-weight="bold">KUĆI</fo:block>
          </fo:table-cell>
          <fo:table-cell border-top-width="0.5px" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA" border-top-style="solid" border-top-color="#cccccc" number-columns-spanned="8">
          <fo:block margin-top="0.5mm" font-weight="bold">VANI</fo:block>                      
          </fo:table-cell>
        <fo:table-cell border-top-width="0.5px" border-right-width="0.0px" border-right-style="solid" border-right-color="#000000" number-columns-spanned="1">
          <fo:block font-weight="bold"></fo:block>                      
          </fo:table-cell>
        </fo:table-row>                   

        <fo:table-row background-color="#000000" font-size="5pt" text-align="center">
          <fo:table-cell width="6mm" text-align="center">
              <fo:block font-weight="bold" color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='positionTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="29mm" text-align="start">
            <fo:block font-weight="bold" color="#ffffff">Klub</fo:block>
          </fo:table-cell>
          
          
          <fo:table-cell width="2mm" text-align="center" border-left-width="0.5px" border-left-style="solid" border-left-color="#AAAAAA">
            <fo:block color="#ffffff"></fo:block>
          </fo:table-cell>
          
          
          <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
                   <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="10mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="10mm" text-align="center">
            <fo:block color="#ffffff">G.Raz.</fo:block>
          </fo:table-cell>
          <fo:table-cell width="8mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsTotal']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          
          
          <fo:table-cell width="2mm" text-align="center" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA">
            <fo:block color="#ffffff"></fo:block>
          </fo:table-cell>
          <fo:table-cell width="2mm" text-align="center">
            <fo:block color="#ffffff"></fo:block>
          </fo:table-cell>
          
          
          <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          
          <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="10mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotalHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="10mm" text-align="center">
            <fo:block color="#ffffff">G.Raz.</fo:block>
          </fo:table-cell>
          <fo:table-cell width="8mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsHome']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          
          
          <fo:table-cell width="2mm" text-align="center" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA">
            <fo:block color="#ffffff"></fo:block>
          </fo:table-cell>
          <fo:table-cell width="2mm" text-align="center">
            <fo:block color="#ffffff"></fo:block>
          </fo:table-cell>
          
          
          <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='matchesAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='winAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          
          <fo:table-cell width="5mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='lossAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="10mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='goalsTotalAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          <fo:table-cell width="10mm" text-align="center">
            <fo:block color="#ffffff">G.Raz.</fo:block>
          </fo:table-cell>
          <fo:table-cell width="8mm" text-align="center">
            <fo:block color="#ffffff"><xsl:value-of select="Tournament/LeagueTable/LeagueTableKeys/LeagueTableKey[@key='pointsAway']/Translation[@key='columnName']/TranslatedValue[@lang='hr']/@value"/></fo:block>
          </fo:table-cell>
          
          
          <fo:table-cell width="2mm" text-align="center" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA">
            <fo:block color="#ffffff"></fo:block>
          </fo:table-cell>
          
          
          <fo:table-cell width="6m" text-align="center">
            <fo:block color="#ffffff">Plasman</fo:block>
          </fo:table-cell>
        </fo:table-row>                                       
      </fo:table-header>
      <fo:table-body>
        <xsl:for-each select="Tournament/LeagueTable/LeagueTableRows/LeagueTableRow">
          <fo:table-row>
            <xsl:if test="position() mod 2 = 1">
              <xsl:attribute name="background-color">#eeeeee</xsl:attribute>
            </xsl:if>                      
            <fo:table-cell width="6mm" text-align="center">
              <fo:block>
                <xsl:value-of select="LeagueTableColumn[@key='positionTotal']/@value"/>
              </fo:block>
            </fo:table-cell>
            <fo:table-cell width="29mm" text-align="start">
              <fo:block font-weight="bold">
                <xsl:value-of select="Team/@name" />
              </fo:block>
            </fo:table-cell>
            
            
            
            
            
            
            
           <!-- PAROVI --> 
           
           
           
           
 <!-- UKUPNO -->            
           
            <fo:table-cell width="2mm" font-weight="bold" text-align="center" border-left-width="0.5px" border-left-style="solid" border-left-color="#AAAAAA">
              <fo:block></fo:block>
            </fo:table-cell>
            
            
            <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='matchesTotal']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='winTotal']/@value"/></fo:block>
            </fo:table-cell>
            
            <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='lossTotal']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="10mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='goalsTotal']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="10mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='goalDiffTotal']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="8mm" font-weight="bold" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='pointsTotal']/@value"/></fo:block>
            </fo:table-cell>
            
            
            <fo:table-cell width="2mm" font-weight="bold" text-align="center" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA">
              <fo:block></fo:block>
            </fo:table-cell>
            <fo:table-cell width="2mm" font-weight="bold" text-align="center">
              <fo:block></fo:block>
            </fo:table-cell>




 <!-- KUCI --> 




            <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='matchesHome']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='winHome']/@value"/></fo:block>
            </fo:table-cell>
            
              <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='lossHome']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="10mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='goalsTotalHome']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="10mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='goalDiffHome']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="8mm" font-weight="bold" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='pointsHome']/@value"/></fo:block>
            </fo:table-cell>
            
            
            <fo:table-cell width="2mm" font-weight="bold" text-align="center" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA">
              <fo:block></fo:block>
            </fo:table-cell>
            <fo:table-cell width="2mm" font-weight="bold" text-align="center">
              <fo:block></fo:block>
            </fo:table-cell>
            
            
            
 <!-- VANI -->             
            


            <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='matchesAway']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='winAway']/@value"/></fo:block>
            </fo:table-cell>
            
            <fo:table-cell width="5mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='lossAway']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="10mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='goalsTotalAway']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="10mm" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='goalDiffAway']/@value"/></fo:block>
            </fo:table-cell>
            <fo:table-cell width="8mm" font-weight="bold" text-align="center">
              <fo:block><xsl:value-of select="LeagueTableColumn[@key='pointsAway']/@value"/></fo:block>
            </fo:table-cell>
            
            
            <fo:table-cell width="2mm" font-weight="bold" text-align="center" border-right-width="0.5px" border-right-style="solid" border-right-color="#AAAAAA">
              <fo:block></fo:block>
            </fo:table-cell>
            
            
            <fo:table-cell width="14mm" text-align="center">
            <xsl:variable name="value" select="Promotion/Translation[@key='name']/TranslatedValue[@lang='hr']/@value"/>
            <xsl:value-of select="$value" />
			<xsl:choose>
          	<xsl:when test="$value = 'Liga Prvaka'"><fo:block>LP</fo:block></xsl:when>
			<xsl:when test="$value = 'Kvalifikacije za Ligu Prvaka'"><fo:block>LP/Q</fo:block></xsl:when>
			<xsl:when test="$value = 'UEFA Europska Liga, Kvalifikacije'"><fo:block>EL/Q</fo:block></xsl:when>
			<xsl:when test="$value = 'Doigravanje za opstanak'"><fo:block>Doigravanje</fo:block></xsl:when>
			<xsl:when test="$value = 'Internacionalno natjecanje'"><fo:block>Internac.N.</fo:block></xsl:when>
          	<xsl:otherwise>
            <fo:block><xsl:value-of select="$value" /></fo:block>
          	</xsl:otherwise>
	        </xsl:choose>
	        </fo:table-cell>


          </fo:table-row>
        </xsl:for-each>
      </fo:table-body>
    </fo:table> 
  </xsl:template>




</xsl:stylesheet>
